package com.chen.service.impl;

import com.chen.mapper.RoleMapper;
import com.chen.pojo.entry.Role;
import com.chen.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author chen
 * @version 1.0
 * @create_date 2025/8/20
 * 角色管理业务实现类
 */
@Service
@Transactional
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    /**
     * 查询所有角色
     *
     * @return 结果
     */
    @Override
    public List<Role> getAllRoles() {
        return roleMapper.selectList(null);
    }
}
